PDF Generation API

Add PDF generation to your application with our REST API

Explore The

API Reference

Templates and documents are the two foundational resources of DocuGenerate. By leveraging them, you can build document generation workflows tailored to the specific needs of your organization.

Simple Yet Powerful

With only 10 endpoints, the API Reference has all the necessary building blocks.

OpenAPI Specification

Generate a client for your language from the OpenAPI spec instead of writing HTTP calls.

List of all the API endpoints available in the DocuGenerate API
Design With

Word Templates

Your templates are ordinary Word files, so it's easy to edit them in your favorite document editor, no need to learn new software. If versioning is enabled, every new upload preserves the previous file.

Merge Tags

Mark the dynamic parts with merge tags and send matching keys in the generation request.

Full Lifecycle

Create, update, list and delete templates from code, so your app manages its own library.

Word template with merge tags
Get Started With Our

REST API

Send a POST request to the document endpoint with the ID of your template and the data you want merged into it, and DocuGenerate responds with an object containing a link to the generated document.

First Steps

Follow the API Quick Start guide to create a template and generate your first document.

JSON Or Form Data

Send the data as a JSON body or as form fields, whichever content type suits your stack.

Example of a REST API call for generating a PDF document
Generate Without

Cloud Storage

By default, generated documents are stored in the cloud. Ask for the binary format when making the request, and the file is never saved on our end, as it comes back directly in the response body.

Privacy Option

To receive the binary response , ensure that you specify the Accept header in your request.

Document Metadata

The response carries the filename and the generated document ID in its headers.

Request with an octet-stream Accept header returning the PDF with Content-Disposition and X-Document-Id headers
Low Latency With

Regional Endpoints

Point your integration at the API endpoint closest to your users. Documents are processed and stored in that region, and only the base URL changes, so the parameters and responses stay exactly the same.

4 Regions

Choose from the United States, European Union, United Kingdom or Australia.

99.9% Uptime

Every region runs to the same 99.9% uptime commitment, on every plan.

DocuGenerate regional API endpoints in San Francisco, Frankfurt, London and Sydney
And Some More

Customize Your PDFs

Beyond merging data into a template, you can assemble documents, attach files and much more, directly from the API.

Merge Static PDFs

Append terms, appendices or any static PDF after the generated pages to build a complete document for your business.

Learn More

Add Attachments to PDFs

Attach images, spreadsheets or other types of files to your PDF, so everything travels in a single document.

Learn More

Create E-Invoices

Send a CII XML and we detect the profile, then package the invoice as a Factur-X compliant PDF/A-3.

Learn More

Organize in Folders

Name the folder path when you upload a template and any missing folders are created for you.

Learn More
Rectangle shape
FAQ

Your Questions Answered

Questions frequently asked by developers evaluating our API

Generated documents are stored indefinitely until explicitly deleted. There is no retention window to plan around.
No. The data is transient. It is used for the merge and then discarded, never written to the logs or the database.
For Word files, the generation time is brief, averaging between 1-2 seconds. For PDF files, expect a slightly longer duration of about 3-6 seconds, depending on their size. Learn more.
Yes. Every plan, including Free, comes with full API access. What changes between plans is your monthly document volume, not what the API can do.
Concurrency runs from 1 document on the Free plan, 2 on Plus, 10 on Premium and 20 or more on Business. Learn more.
PDF, DOCX, DOC, ODT, TXT, HTML and PNG, plus the PDF/A archival variants. Set the format per request, so the same template can serve different purposes.